﻿<%@ Page Language="C#" MasterPageFile="~/admin/MasterPage_Admin.master" AutoEventWireup="true"
    CodeFile="reporttype.aspx.cs" Inherits="admin_Default" Title="IT110：不良信息举报与检索平台 - 查询信息管理 - By ECountry.Ltd" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder_Search" runat="Server">
    <div class="w-sjzzbb">
        <div class="w-sjzztop">
            综合数据管理
        </div>
    </div>
    <asp:UpdatePanel ID="UpdatePanel2" runat="server">
        <ContentTemplate>
        <div style="border:1px solid #09f;text-align:left"><p style="font-size:17px;text-align:center">举报数据禁用与查询中心</p> 
            请选择信息类型：
            <asp:DropDownList ID="DropDownList_type" runat="server" DataSourceID="ObjectDataSource_type"
                DataTextField="type" DataValueField="id" AppendDataBoundItems="True" AutoPostBack="True">
                <asp:ListItem Value="0" Selected="True">==全部==</asp:ListItem>
            </asp:DropDownList>
            <br />
            <font color="red">*说明：举报类型为空，说明本条为全局类型，会在所有举报选择中出现。 </font>
            </div>
            <asp:ListView ID="ListView1" runat="server" DataKeyNames="id" DataSourceID="ObjectDataSource_Reporttype"
                InsertItemPosition="LastItem" OnItemInserting="ListView1_ItemInserting1">
                <AlternatingItemTemplate>
                    <tr style="background-color: #FFFFFF; color: #284775;height:35px;">  
                        <td style="width: 100px;">
                            <asp:Label ID="typeLabel" runat="server" Text='<%# Eval("typename") %>' />
                        </td>
                        <%--<td>
                               <asp:Label ID="idLabel" runat="server" Text='<%# Eval("id") %>' />
                           </td>--%>
                        <td style="width: 150px;">
                            <asp:Label ID="titleLabel" runat="server" Text='<%# Eval("title") %>' />
                        </td>
                        <td>
                            <asp:Label ID="contentLabel" runat="server" Text='<%# Eval("content") %>' />
                        </td>
                        <td style="width: 60px; text-align: center">
                            <asp:Label ID="sortLabel" runat="server" Text='<%# Eval("sort") %>' />
                        </td>
                        <td style="width: 60px; text-align: center">
                            <asp:CheckBox ID="Delete_flagCheckBox" runat="server" Checked='<%# Eval("Delete_flag") %>'
                                Enabled="false" />
                        </td>
                        <td style="width: 110px; text-align: center">
                            <asp:Button ID="DeleteButton" runat="server" CommandName="Delete" Text="删除" OnClientClick="javascript:return confirm('您确定要删除该记录吗? 您将无法恢复！')" />
                            <asp:Button ID="EditButton" runat="server" CommandName="Edit" Text="编辑" />
                        </td>
                    </tr>
                </AlternatingItemTemplate>
                <LayoutTemplate>
                    <table id="Table1" runat="server" width="100%">
                        <tr id="Tr1" runat="server">
                            <td id="Td1" runat="server">
                                <table id="itemPlaceholderContainer" runat="server" style="background-color: #FFFFFF;
                                    border-collapse: collapse; border-color: #999999; border-style: none; border-width: 1px;
                                    font-family: Verdana, Arial, Helvetica, sans-serif; width: 100%;">
                                    <tr id="Tr2" runat="server" style="background-color: #0099FF;color: #FFF;HEIGHT:35px;">
                                        <th id="Th2" runat="server" align="center">
                                            信息分类
                                        </th>
                                        <th id="Th3" runat="server" align="center">
                                            举报类型
                                        </th>
                                        <th id="Th4" runat="server" align="center">
                                            类型描述
                                        </th>
                                        <th id="Th5" runat="server" align="center">
                                            显示排序
                                        </th>
                                        <th id="Th6" runat="server" align="center">
                                            禁用
                                        </th>
                                        <th id="Th1" runat="server">
                                        </th>
                                    </tr>
                                    <tr id="itemPlaceholder" runat="server">
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr id="Tr3" runat="server">
                            <td id="Td2" runat="server" style="text-align: center; background-color: #0099FF; font-family: Verdana, Arial, Helvetica, sans-serif;
                                color: #FFFFFF">
                                <asp:DataPager ID="DataPager1" runat="server" PageSize="16">
                                    <Fields>
                                        <asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" ShowLastPageButton="True" ButtonCssClass="datapager"/>
                                    </Fields>
                                </asp:DataPager>
                            </td>
                        </tr>
                    </table>
                </LayoutTemplate>
                <InsertItemTemplate>
                    <tr style="">
                        <td style="width: 90px; text-align: center;height:35px">
                            <asp:DropDownList ID="DropDownList2" runat="server" DataSourceID="ObjectDataSource_type"
                                DataTextField="type" DataValueField="id" AppendDataBoundItems="True">
                                <asp:ListItem Value="0" Selected="True">全局类型</asp:ListItem>
                            </asp:DropDownList>
                            <%--                       <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                           OldValuesParameterFormatString="original_{0}" 
                           SelectMethod="Get_Data_OrderBy_id" 
                           TypeName="DataSet_fp_DyhTableAdapters.Dyh_typeTableAdapter">
                       </asp:ObjectDataSource>
                            --%>
                            <%--                             <asp:DropDownList ID="DropDownList1" runat="server" 
                                  DataSourceID="ObjectDataSource_type" DataTextField="type" DataValueField="id" SelectedValue='<%# Bind("type") %>'>
                             </asp:DropDownList>
                            --%>
                            <%--<asp:TextBox ID="typeTextBox" runat="server" Text='<%# Bind("type") %>' Width="5" />--%>
                        </td>
                        <%--<td>
                               <asp:Label ID="idLabel" runat="server" Text='<%# Eval("id") %>' />
                           </td>--%>
                        <td style="width: 90px;">
                            <asp:TextBox ID="titleTextBox" runat="server" Text='<%# Bind("title") %>' Width="80" style="border:1px solid #09f"/>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*不能为空."
                                ControlToValidate="titleTextBox" Display="Dynamic" ValidationGroup="insert"></asp:RequiredFieldValidator>
                        </td>
                        <td>
                            <asp:TextBox ID="contentTextBox" runat="server" Text='<%# Bind("content") %>' Width="220"  style="border:1px solid #09f"/>
                        </td>
                        <td style="width: 60px; text-align: center">
                            <asp:TextBox ID="sortTextBox" runat="server" Text='<%# Bind("sort") %>' Width="55"  style="border:1px solid #09f"/>
                        </td>
                        <td style="width: 60px; text-align: center">
                            <asp:CheckBox ID="Delete_flagCheckBox" runat="server" Checked='<%# Bind("Delete_flag") %>' />
                        </td>
                        <td style="width: 110px; text-align: center">
                            <asp:Button ID="InsertButton" runat="server" CommandName="Insert" Text="插入" ValidationGroup="insert" />
                            <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="清除" />
                        </td>
                    </tr>
                </InsertItemTemplate>
                <SelectedItemTemplate>
                    <tr style="background-color: #E2DED6; font-weight: bold; color: #333333;">
                        <td>
                            <asp:Label ID="idLabel" runat="server" Text='<%# Eval("id") %>' />
                        </td>
                        <td>
                            <asp:Label ID="titleLabel" runat="server" Text='<%# Eval("title") %>' />
                        </td>
                        <td>
                            <asp:Label ID="contentLabel" runat="server" Text='<%# Eval("content") %>' />
                        </td>
                        <td>
                            <asp:Label ID="typeLabel" runat="server" Text='<%# Eval("type") %>' />
                        </td>
                        <td>
                            <asp:Label ID="sortLabel" runat="server" Text='<%# Eval("sort") %>' />
                        </td>
                        <td>
                            <asp:CheckBox ID="Delete_flagCheckBox" runat="server" Checked='<%# Eval("Delete_flag") %>'
                                Enabled="false" />
                        </td>
                        <td>
                            <asp:Button ID="DeleteButton" runat="server" CommandName="Delete" Text="删除" OnClientClick="javascript:return confirm('您确定要删除该记录吗? 您将无法恢复！')" />
                            <asp:Button ID="EditButton" runat="server" CommandName="Edit" Text="编辑" />
                        </td>
                    </tr>
                </SelectedItemTemplate>
                <EmptyDataTemplate>
                    <table id="Table2" runat="server" style="background-color: #FFFFFF; border-collapse: collapse;
                        border-color: #999999; border-style: none; border-width: 1px;">
                        <tr>
                            <td>
                                未返回数据。
                            </td>
                        </tr>
                    </table>
                </EmptyDataTemplate>
                <EditItemTemplate>
                    <tr style="background-color: #999999;">
                        <td style="width: 90px;">
                            <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="ObjectDataSource_type"
                                DataTextField="type" DataValueField="id" SelectedValue='<%# Bind("type") %>'
                                AppendDataBoundItems="True">
                                <asp:ListItem Value="0" Selected="True">全局类型</asp:ListItem>
                            </asp:DropDownList>
                            <%--<asp:TextBox ID="typeTextBox" runat="server" Text='<%# Bind("type") %>' Width="5" />--%>
                        </td>
                        <%--<td>
                               <asp:Label ID="idLabel" runat="server" Text='<%# Eval("id") %>' />
                           </td>--%>
                        <td style="width: 90px;">
                            <asp:TextBox ID="titleTextBox" runat="server" Text='<%# Bind("title") %>' Width="80" />
                        </td>
                        <td>
                            <asp:TextBox ID="contentTextBox" runat="server" Text='<%# Bind("content") %>' Width="220" />
                        </td>
                        <td style="width: 60px; text-align: center">
                            <asp:TextBox ID="sortTextBox" runat="server" Text='<%# Bind("sort") %>' Width="55" />
                        </td>
                        <td style="width: 60px; text-align: center">
                            <asp:CheckBox ID="Delete_flagCheckBox" runat="server" Checked='<%# Bind("Delete_flag") %>' />
                        </td>
                        <td style="width: 110px; text-align: center">
                            <asp:Button ID="UpdateButton" runat="server" CommandName="Update" Text="更新" />
                            <asp:Button ID="CancelButton" runat="server" CommandName="Cancel" Text="取消" />
                        </td>
                    </tr>
                </EditItemTemplate>
                <ItemTemplate>
                    <tr style="background-color: #c7e9ff; color: #333333;height:35px;">
                        <td style="width: 90px;">
                            <asp:Label ID="typeLabel" runat="server" Text='<%# Eval("typename") %>' />
                        </td>
                        <%--<td>
                               <asp:Label ID="idLabel" runat="server" Text='<%# Eval("id") %>' />
                           </td>--%>
                        <td style="width: 90px; ">
                            <asp:Label ID="titleLabel" runat="server" Text='<%# Eval("title") %>' />
                        </td>
                        <td>
                            <asp:Label ID="contentLabel" runat="server" Text='<%# Eval("content") %>' />
                        </td>
                        <td style="width: 60px; text-align: center">
                            <asp:Label ID="sortLabel" runat="server" Text='<%# Eval("sort") %>' />
                        </td>
                        <td style="width: 60px; text-align: center">
                            <asp:CheckBox ID="Delete_flagCheckBox" runat="server" Checked='<%# Eval("Delete_flag") %>'
                                Enabled="false" />
                        </td>
                        <td style="width: 110px; text-align: center">
                            <asp:Button ID="DeleteButton" runat="server" CommandName="Delete" Text="删除" />
                            <asp:Button ID="EditButton" runat="server" CommandName="Edit" Text="编辑" />
                        </td>
                    </tr>
                </ItemTemplate>
            </asp:ListView>
            <font color="red">*说明：举报类型为空，说明本条为全局类型，会在所有举报选择中出现。 </font>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:ObjectDataSource ID="ObjectDataSource_type" runat="server" OldValuesParameterFormatString="original_{0}"
        SelectMethod="Get_Data_OrderBy_id" TypeName="DataSet_fp_DyhTableAdapters.Dyh_typeTableAdapter">
    </asp:ObjectDataSource>
    <asp:ObjectDataSource ID="ObjectDataSource_Reporttype" runat="server" DeleteMethod="Delete"
        InsertMethod="Insert_New_Data_Query" OldValuesParameterFormatString="original_{0}"
        SelectMethod="Get_Full_Data_By_Type" TypeName="DataSet_fp_DyhTableAdapters.Dyh_report_typeTableAdapter"
        UpdateMethod="Update">
        <DeleteParameters>
            <asp:Parameter Name="Original_id" Type="Byte" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="title" Type="String" />
            <asp:Parameter Name="content" Type="String" />
            <asp:Parameter Name="type" Type="Byte" />
            <asp:Parameter Name="sort" Type="Byte" />
            <asp:Parameter Name="Delete_flag" Type="Boolean" />
            <asp:Parameter Name="Original_id" Type="Byte" />
        </UpdateParameters>
        <SelectParameters>
            <asp:ControlParameter ControlID="DropDownList_type" DefaultValue="0" Name="type"
                PropertyName="SelectedValue" Type="Byte" />
        </SelectParameters>
        <InsertParameters>
            <asp:Parameter Name="title" Type="String" />
            <asp:Parameter Name="content" Type="String" />
            <asp:Parameter Name="type" Type="Byte" />
            <asp:Parameter Name="sort" Type="Byte" />
            <asp:Parameter Name="Delete_flag" Type="Boolean" />
        </InsertParameters>
    </asp:ObjectDataSource>
</asp:Content>